﻿using CardPlay.Model.CardModel;
using CardPlay.Model.GameModel;
using CardPlay.Model.GameModel.Actions;

namespace CardPlay.DemoPack.Games.KlondikeVariants
{
    [Game("058FF48F-E5D2-4E4A-A63B-31867BE2A806", LevelOfDifficulty.Medium, LevelOfSkill.MostlyChance, DurationOfPlay.Within5To10Minutes, Family = FamilyName)]
    public class Easthaven : AgnesSorel
    {
        public Easthaven()
        {
            MaximumDeals = 1;
            TotalTableaus = 7;
            TableauBuildSequence = CardFaceSequence.AlternatingColorDescendingRank;
        }

        protected override void PrepareDealScript(DealScript script)
        {
            script.DealToEach(NamesOfTableaus, "down;down;up");
            script.DealRemainingFaceDownTo(Stock);
        }

        protected override bool AllowedToBuildEmptyTableau(MovePileAction action)
        {
            return action.PileBeingMoved.BottomCard.Rank != FoundationBaseRank;
        }
    }
}